<div #tagsInputWrapper class="devui-tags-host {{ multiline ? '' : 'init-inline' }}" tabindex="-1" (click)="host_click()">
  <d-toggle-menu-container
    [isOpen]="isOpen"
    [appendToBody]="appendToBody"
    [selectWrapper]="tagsInputWrapperItem"
    [disabled]="disabled || selectedItems?.length >= maxTags"
    [toggleOnFocus]="true"
    [showAnimation]="showAnimation"
    [closeScope]="'blank'"
    (passEvent)="passEvent($event)"
    (toggleChange)="toggleChangeFn($event)"
  >
    <d-toggle-menu-label
      [multiItems]="selectedItems"
      [mode]="'multiple-line'"
      [valueParser]="valueParser"
      [disabled]="disabled"
      [maxHeight]="maxHeight"
      (removeChange)="removeTag($event)"
    ></d-toggle-menu-label>
    <d-toggle-menu-search
      *ngIf="!disabled"
      [inputValue]="newTag"
      [searchPlaceholder]="getPlaceHolder"
      [searchFn]="searchFn"
      [spellcheck]="spellcheck"
      [isShowSearchIcon]="false"
      [disabled]="disabled || selectedItems?.length >= maxTags"
      [inputWidth]="multiline ? '' : 'auto'"
      [delay]="0"
      (searchInputValueChange)="searchInputValueChange($event)"
    ></d-toggle-menu-search>
    <d-toggle-menu-list
      [eventHandle]="inputEvent"
      [options]="availableOptions"
      [value]="selectedItems"
      [virtualScroll]="virtualScroll"
      [hasSelectIndex]="true"
      [isFiltering]="newTag?.length > 0"
      [listItemTemplate]="listItem"
      [closeScope]="'blank'"
      (toggleChange)="toggleChangeFn($event)"
      (valueChange)="setValue($event)"
    >
      <ng-template #listItem let-item="item" let-index="index" let-selectIndex="selectIndex" let-choose="choose">
        <d-toggle-menu-list-item
          [item]="item"
          [index]="index"
          [selectIndex]="selectIndex"
          [highlightToggle]="false"
          [customTemplate]="itemTemplate"
          [filterKey]="displayProperty"
          (chooseItem)="choose($event)"
        ></d-toggle-menu-list-item>
      </ng-template>
    </d-toggle-menu-list>
  </d-toggle-menu-container>
</div>
